
#ifndef  CHECKSUM_H
#define  CHECKSUM_H

#include <cstdint>
#include <string>


class CheckSum {
public:
    inline uint32_t crc32(const std::string & data) {
        return crc32(0, data.c_str(), data.size());
    }
    inline uint32_t crc32(const char * buf, size_t len){
        return crc32(0, buf, len);
    }
    inline uint32_t crc32(uint32_t crc, const std::string & data) {
        return crc32(crc, data.c_str(), data.size());
    }

    uint32_t crc32(uint32_t crc, const char * buf, size_t len);
private:
};

#endif   /* CHECKSUM_H */
